import unittest

from simulate import simulate

class SimulateTest(unittest.TestCase):
    
    def test_nuts(self):
        self.assertEqual(1, simulate([[14, 'S'], [14, 'D']], 9, community_cards = [[14, 'C'], [14, 'H'], [9, 'S'], [5, 'D']]))
        self.assertEqual(1, simulate([[14, 'S'], [13, 'S']], 9, community_cards = [[12, 'S'], [11, 'S'], [10, 'S']]))
    
    def test_draw(self):
        royal_flush = [[14, 'S'], [13, 'S'], [12, 'S'], [11, 'S'], [10, 'S']]
        self.assertEqual(0.5, simulate([[14, 'H'], [13, 'H']], 1, community_cards = royal_flush))
        self.assertEqual(0.25, simulate([[14, 'H'], [14, 'C']], 3, community_cards = royal_flush))

if __name__ == '__main__':
    unittest.main()